package com.nj.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;

@Data
@TableName("b_income_record")
@Accessors(chain = true)
public class Income {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer uid;
    @TableField("prod_id")
    private Integer prodId;
    @TableField("bid_id")
    private Integer bidId;
    @TableField("bid_money")
    private BigDecimal bidMoney;
    @TableField("income_date")
    @JsonSerialize(using = LocalDateTimeSerializer.class)//序列化器
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)//反序列化器
    private LocalDate incomeDate;
    @TableField("income_money")
    private BigDecimal incomeMoney;
    @TableField("income_status")
    private Integer incomeStatus;

}
